﻿using Biz.Core.Models;
using MiniFox.Components;
using MiniFox.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Biz.Core
{
    /// <summary>
    /// 设备管理服务组件
    /// </summary>
    [AutoRegister]
    public interface IDeviceService
    {
        /// <summary>
        /// 查询数据(列表)
        /// </summary>
        /// <param name="queryObject">查询对象</param>
        /// <returns></returns>
        ResultObject<IEnumerable<DeviceVo>> QueryDeviceList(PagedQueryObject<SearchModel> queryObject);
        /// <summary>
        /// 查询数据(表格)
        /// </summary>
        /// <param name="queryObject"></param>
        /// <returns></returns>
        ResultObject<ViewTable> QueryDevices(PagedQueryObject<SearchModel> queryObject);
        /// <summary>
        /// 创建设备并返回
        /// </summary>
        /// <param name="deviceDto">设备信息模型</param>
        /// <returns>返回新设备数据</returns>
        DeviceVo CreateDevice(DeviceDto deviceDto);
        /// <summary>
        /// 修改设备并返回
        /// </summary>
        /// <param name="deviceDto"></param>
        /// <returns>返回修改后的设备数据</returns>
        DeviceVo UpdateDevice(DeviceDto deviceDto);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        string DeleteDevice(string deviceId);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        DeviceVo Toggle(string deviceId);
        /// <summary>
        /// 获取单个设备
        /// </summary>
        /// <param name="deviceId"></param>
        /// <returns></returns>
        DeviceVo GetDevice(string deviceId);
    }
}
